<template>
  <view class="obligation">
    <view class="navbar1">
      <view class="iconfont icon-xiangzuo"
            @tap='returns'></view>
      <text v-if="status == '0'">我的待付款订单</text>
    </view>
    <view v-if="status == '0'">
      <orderGoods :cartInfo="cartInfo" />
    </view>
    <view v-if="status == '1'">
      我是待发货页面
    </view>
    <view v-if="status == '2'">
      我是待收货页面
    </view>
    <view v-if="status == '3'">
      我是待评价页面
    </view>

  </view>
</template>

<script>
import orderGoods from '@/components/orderGoods/index2'
export default {
  data() {
    return {
      status: '0',
      cartInfo: [
        {
          bargain_id: 0,
          cart_num: 1,
          combination_id: 0,
          costPrice: '1.00',
          id: '568754381356400640',
          productInfo: {
            activity: '0,1,2,3',
            add_time: 1607434067,
            bar_code: '',
            browse: 0,
            cate_id: '11,6,13',
            code_path: '',
            cost: '1.00',
            cost_score: 0,
            ficti: 10,
            give_integral: '0.00',
            id: 272,
            image:
              'http://kaifa.crmeb.net/uploads/attach/2019/07/30/4d280506de9f99621d6c9257abb00002.jpg',
            is_bargain: null,
            is_benefit: 1,
            is_best: 0,
            is_del: 0,
            is_good: 0,
            is_hot: 1,
            is_new: 0,
            is_postage: 0,
            is_seckill: 0,
            is_show: 1,
            is_sub: 0,
            keyword: '11',
            label_id: '0',
            mer_id: 0,
            mer_use: 0,
            ot_price: '12.00',
            pink_price: '100.00',
            pink_type: 3,
            suk:'[默认]',
            postage: '0.00',
            price: '10.00',
            product_start_num: 1000,
            product_type: 1,
            pt_end_time: 0,
            pt_start_time: 0,
            sales: 11,
            section_time: '100',
            sort: 1,
            soure_link: '',
            spec_type: 0,
            spu: '5152995002108',
            stock: 89,
            store_info: '11',
            store_name: '测试商品',
            temp_id: 1,
            unit_name: '11',
            video_link: '',
            vip_price: '0.00',
          },
        },
      ],
    }
  },
  components: {
    orderGoods,
  },
  methods: {
    onLoad: function (options) {
      console.log(options)
      this.status = options.status
    },
    returns() {
      uni.navigateBack()
    },
  },
}
</script>

<style>
.obligation {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #f7f7f7;
}
</style>